package com.neu.eurekaconsumerbook.controller;

import com.neu.dto.BookDto;
import com.neu.eurekaconsumerbook.service.BookService;
import com.neu.util.CommonResult;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@CrossOrigin
@RestController
@RequestMapping("/book")
public class BookController {
    @Resource
    private BookService bookService;
    @RequestMapping("/add")
    public CommonResult add(@RequestBody BookDto dto){
        return bookService.doAdd(dto);
    }
}
